{% extends "main.html" %}

{% block content %}
<div class="content-box">
  <div class="content-box-header">
    <h3>Fractions</h3>
    <ul class="content-box-tabs">
      <li><a href="#tab1" class="default-tab">List</a></li>
      {% if user.is_staff %}
        <li><a href="/fraccoes/novo">Add Fraction</a></li>
      {% endif %}
    </ul>
    <div class="clear"></div>
</div>

<div class="content-box-content">
  <div class="tab-content default-tab" id="tab1">
      
      <table>
        <thead>
          <tr>
            <th>Fraction</th>
            <th>Tipology</th>
            <th>Owner</th>
            <th>Details</th>
            <th></th>
          </tr>
        </thead>
	{% for fraccao in object_list %}
	<tr> 
	  <td>{{fraccao.fraccao}}</td>
	  <td>{{fraccao.fraccaoTipo}}</td>
	  <td>{{fraccao.proprietario}}</td>
	  <td>{{fraccao.obs}}</td>
	    <td>{% if user.is_staff %}<a href="{% url editar_fraccao fraccao.id %}">Edit</a>{% endif %}</td>
        </tr> 
	{% endfor %}
      </table>

      
    </div>
  </div>
</div>
{% endblock %}
